Disorders of perception, attention, and memory frequently accompany the major mental diseases. To understand the neural mechanisms of these mental processes, we are recording the activity of neurons in the extrastriate cortex and subcortical structures of monkeys engaged in tasks requiring visual discrimination, attention, and memory. We have developed neural network models that predict the responses of cortical neurons to complex patterns. We found that information processing in the cortex is modulated by selective attention, and that the source of the modulation is a network of critical structures, including the lateral pulvinar and the superior colliculus. Attention thus determines which visual information reaches neural mechanisms for memory storage. We have found evidence for neural mechanisms in the inferior temporal cortex that underlie both working memory and long-term memory. Inferior temporal neurons appear to function as adaptive mnemonic filters that compare current stimuli to stored memory traces. Further, the responses of neural populations in temporal cortex change as a result of experience, providing a possible basis for long-term memory. During recall of stored memories, specific neurons in inferior temporal cortex and area V4 are reactivated, thereby segregating, or "labeling", the neurons providing the information needed for a given task. In contrast to the mnemonic role of inferior temporal cells, cells in the caudal neostriatum show response changes related to the build-up of stimulus-response associations.